﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace IvyOrm
{
    /// <summary>
    /// Specifies additional table specific options for IvyOrm methods.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
    public sealed class TableAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        [DebuggerHidden] //so simple don't need code coverage
        public TableAttribute()
        { }

        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="tableName">The name of the database table, used by IvyOrm for Inserts, Updates and Deletes</param>
        [DebuggerHidden] //so simple don't need code coverage
        public TableAttribute(string tableName)
        {
            this.TableName = tableName;
        }

        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="options">Addional table level options for IvyOrm</param>
        [DebuggerHidden] //so simple don't need code coverage
        public TableAttribute(TableOptions options)
        {
            this.Options = options;
        }

        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="tableName">The name of the database table, used by IvyOrm for Inserts, Updates and Deletes</param>
        /// <param name="options">Addional table level options for IvyOrm</param>
        [DebuggerHidden] //so simple don't need code coverage
        public TableAttribute(string tableName, TableOptions options)
        {
            this.TableName = tableName;
            this.Options = options;
        }

        /// <summary>
        /// The name of the database table, used by IvyOrm for Inserts, Updates and Deletes
        /// </summary>
        public string TableName { get; private set; }

        /// <summary>
        /// Addional table level options for IvyOrm
        /// </summary>
        public TableOptions Options { get; private set; }

        
    }
}
